process interrupts that happen without cause (called spurious
interrupts)
handle all possible device errors
wake processes that are sleeping on any events associated with the
interrupt
There are also many tasks the _iiii_nnnn_tttt_rrrr routine must perform that are driver-
type and device specific. For example, the following types of drivers
require different functions from their _iiii_nnnn_tttt_rrrr routines:
A block driver dequeues requests and wakes up processes sleeping on
an I/O request.
A terminal driver receives and sends characters.
A printer driver ensures that characters are sent.
In addition, the functions of an _iiii_nnnn_tttt_rrrr routine are device dependent. You
should know the exact chip set that produces the interrupt for your
device. You need to know the exact bit patterns of the device's control
and status register and how data is transmitted into and out of your
computer. These specifics differ for every device you access.
The _iiii_nnnn_tttt_rrrr routine for an intelligent controller that does not use
individual interrupt vectors for each subdevice must access the
completion queue to determine which subdevice generated the interrupt.
It must also update the status information, set/clear flags, set/clear
error indicators, and so forth to complete the handling of a job. The
code should also be able to handle a spurious completion interrupt
identified by an empty completion queue. When the routine finishes, it
should advance the unload pointer to the next entry in the completion
queue.
If the driver called _bbbb_iiii_oooo_wwww_aaaa_iiii_tttt(D3) or _ssss_llll_eeee_eeee_pppp(D3) to await the completion of
an operation, the _iiii_nnnn_tttt_rrrr routine must call _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee(D3) or _wwww_aaaa_kkkk_eeee_uuuu_pppp(D3) to
signal the process to resume.
The interrupt routine runs at the processor level associated with the
interrupt level for the given device. Lower priority interrupts are
deferred while the interrupt routine is active. Certain processor levels
can block different interrupts. See _ssss_pppp_llll(D3) for more information.
_uuuu_iiii_oooo_mmmm_oooo_vvvv_eeee(D3), _uuuu_rrrr_eeee_aaaa_dddd_cccc(D3), and _uuuu_wwww_rrrr_iiii_tttt_eeee_cccc(D3) cannot be used in an interrupt
routine when the _uuuu_iiii_oooo______ssss_eeee_gggg_ffff_llll_gggg member of the _uuuu_iiii_oooo(D4) structure is set to
_UUUU_IIII_OOOO______UUUU_SSSS_EEEE_RRRR_SSSS_PPPP_AAAA_CCCC_EEEE (indicating a transfer between user and kernel space).